home *** CD-ROM | disk | FTP | other *** search
/ Freaks Macintosh Archive / Freaks Macintosh Archive.bin / Freaks Macintosh Archives / Textfiles / zines / hir / hir2 Folder.sit / hir2 Folder / HIR2-4.TXT < prev    next >
Text File  |  1997-09-13  |  10KB  |  176 lines

  1. -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  2.            H  a  c  k  e  r  s     I  n  f  o  r  m  a  t  i  o  n
  3.                           R  e  s  o  u  r  c  e
  4.  
  5.                  PPPPPP  OOOO    RRRRRR  TTTTTTT  ZZZZZZZZ
  6.                 PP  PP  OO  OO  RR  RR     TT         ZZ
  7.                PPPPPP  OO  OO  RRRRR      TT        ZZ
  8.               PP      OO  OO  RR  RR     TT       ZZ
  9.              PP      OO  OO  RR   RR    TT      ZZ
  10.             PP        OOOO  RR    RR   TT     ZZZZZZZZ
  11.  
  12.   A  L i s t   o v   h o s t   p o r t z   a n d   t h e i r   s e r v i c e
  13.  
  14.                                 By Axon
  15. -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  16.  
  17. This article will cover ports.  What are ports?  Well, on most internetted
  18. computers, especially in the UN*X world, there are MANY programs running at
  19. once.  Many of them are servers, or daemons (pronounced "demons") as we shall
  20. call them.  When you telnet to a host, usually you connect via TCP (Transmiss-
  21. ion Control Protocol) to port 23, which usually services Telnet connections.
  22. Typically, a program on the remote computer is running called "telnetd", or
  23. telnet daemon, a program serving telnet connections.  To make this simple, I
  24. will just list TCP functions of the ports.  (there is also a UDP <User Data-
  25. gram Protocol> function that is specified for most ports as well.  I won't
  26. mess with these, because most of them are the same).  I fought with myself on
  27. exactly how to put this thing together.  "Do I make it short, showing only the
  28. really nessecary ports, or do i list all of them i have?"  I kind of made this
  29. a compromise between the two.  This is a list of some of the most popular
  30. ports, and most of them are all you'll need to either find out more info from
  31. the server, obtain superuser status on the server, or bring it to its knees.
  32. Labels marked with a * will be discussed after the list, because they offer
  33. some interesting points of hacking interest.
  34.  
  35. Port #  Label           What it does
  36. ------  -------------   ------------------------------------------------------
  37. 1       tcpmux          TCP Multiplexer
  38. 7       echo            repeats whatever you type back to your terminal
  39. 9       discard         /dev/null  it does nothing but absorb your input
  40. 13      daytime         displays the systems date and time...fun!
  41. 15     *netstat         find info about networking structure of remote host
  42. 19      chargen         scrolls a really trippy pattern of characters
  43. 20      ftpdata         ftp data.  it's hard to explain
  44. 21     *ftp             file transfers
  45. 23     *telnet          remote terminal connection
  46. 25     *smtp            Simple Mail Transfer.  Perfect for faking e-mail!
  47. 43      nicname         whois server
  48. 53      domain          Domain Name Service (DNS) Lookup
  49. 70      gopher          Outdated way to find infos on the net.
  50. 79     *finger          Find who is on remote system (other things listed l8r)
  51. 80      http            Web Stuff (web browsers use this port to get HTML)
  52. 110     pop3            Post Office Protocol-Incoming mail
  53. 113     auth            authorization service
  54.  
  55. Some of these ports are really worth mentioning twice (some of them have 2 or
  56. more uses!)  I guess I'll start from the top, but first, "How do i connect to
  57. these ports?!"  As I mentioned earlier, these are all ports that use TCP.  It
  58. just so happens that Telnet is almost a raw TCP connection, so what better to
  59. use than telnet.  I'll assume we're dealing with a standard UNiX system here.
  60. Typically, when we type "telnet somewhere.yermom.com" the telnet client will
  61. default to port 23.  (how fitting, that's the "telnet" port!)  Well if you
  62. want to connect to a different port on the same server you can simply type
  63. "telnet somewhere.yermom.com" followed by a space, and port number such as 25
  64. if we wanted to mess around with SMTP.  I don't really want to go into the
  65. "how do i haxor r00t with this inph0?" kind of data in here.  If you are a
  66. true hacker (that is defined as "not a malicous cracking leech giving the
  67. people who know what they are doing a bad name" if you care), you will want
  68. to play with what I have given you.  It isn't really hard to find out what
  69. makes the box in the back office tick once you find open ports (and possibly
  70. a good port scanner is in order...search the net, for there are tons of these
  71. pearls swimming around in the ether out there).  On with the show...
  72.  
  73. Netstat- This port, if the connection is accepted, will give you multitudes
  74. of information about network connections being made to and from the host.  It
  75. shows where people are coming from, and what is going on on the network in
  76. general.  Be patient with the data here, as it can get very cryptic at times.
  77. try running netstat on any unix machine and looking at the results, if you
  78. can't find a host that supports this externally.
  79.  
  80. FTP- It's a great thing to be able to snag files off of a remote host.  It is
  81. amazing to me how many hosts allow a user to connect with anonymous FTP, and
  82. allow them to download /etc/passwd...sometimes not even shadowed!  This has
  83. often gotten me that little extra bit of data that I want so that I can finish
  84. off a good hack.  Navigate as much of the system as you can, and look at
  85. ANYTHING you run across that you can get.  This is a HUGE payoff.
  86.  
  87. Telnet- This is about as close to the front door of a host as you will ever
  88. get without setting foot inside the server room (which would be AWESOME!).
  89. Typically, telnetting to the "Telnet" port gets you some sort of a logon
  90. screen, where you are prompted for a user name and password (hrm I wonder what
  91. THAT can be used for...)  It's almost always the place you make your first
  92. attack, and it's usually also the place you go to do your nasties after you
  93. have some usernames (but not always)
  94.  
  95. SMTP- This is where we can do some really fun things that aren't that messy.
  96. there are various vulnerabilities in SMTP that allow one to execute arbitrary
  97. commands as if one were root, but I will not get into that.  I think there are
  98. half a quintillion cookbook hacks for this out on the net, but if you aren't
  99. lame, you'll just try to figure it out yerself.  I will however, cover how to
  100. write some pretty kick-ass fake e-mail.
  101.  
  102.         this requires a "friends" email address, or an enemy, or someone
  103.         you don't know.  Try it on your own email address if you have one,
  104.         just to test it out first.
  105.  
  106.         1) telnet to a host, and make sure you go to port 25  (telnet host 25)
  107.  
  108.         2) if you get a message like "220 hostname SMTP Solarisx.x; Wed, 1 Aug
  109. \           1997 10:19" or something like that you are in!
  110.  
  111.         3) Try this step first: type "MAIL FROM:" and then the e-mail address
  112.            that you want this to look like it's coming from.  It doesn't have
  113.            to be a real E-mail address either!  Just make it something phun.
  114.            (please make sure there is a space between MAIL and TO, but not
  115.            after the :   example MAIL TO:god@heaven.org).
  116.  
  117.         4) If you get some complaint about no HELO command, type "HELO " and
  118.            then the host you are telnetting from.  if not, go to step 5.
  119.  
  120.         5) Type "RCPT TO:" and then the email address you want this fake mail
  121.            to go to.  Maybe yours if you are testing it.  Follow the same
  122.            rules as with the MAIL FROM command.
  123.  
  124.         6) It should say "Sender is Valid" and "Recipient is valid" after you
  125.            do these commands.  if this happens, you are ready to spoof mail!
  126.  
  127.         7) type "DATA" alone on a line and hit enter.  It'll give you a shpeel
  128.            on how to enter the message.  just remember to hit enter at the end
  129.            of each line and you're okay.  When you are done typing, hit enter,
  130.            type a period (.), and hit enter again.  It will then send the
  131.            e-mail along its way, even if it's on a different host, it will
  132.            eventually find its way.  type "QUIT" to close the connection.
  133.  
  134.         If you mailed yourself from god or bill gates or something, check your
  135.         mail in 5 minutes or so...there it should be.
  136.  
  137. Some versions of SMTP allow you to type "VRFY " and a username, to see if
  138. such a user exists on that host.  In example:
  139.  
  140. VRFY Jsmith
  141. 250 <Jsmith@haxord.com>
  142.  
  143. had Jsmith NOT existed on the system, it would have gone like this:
  144.  
  145. VRFY Jsmith
  146. 550 Jsmith... User unknown
  147.  
  148. This is a good way to see if a user exists on a system before you attempt to
  149. try cracking their password (like if you found some usernames and no passwords
  150. somewhere and wanted to know if maybe those users existed on this specific
  151. system.) This brings us to our next phun port...
  152.  
  153. Finger- this is very similar.  it is often used for gathering names of users
  154. on a remote host.  By opening this port and hitting enter, if finger is
  155. enabled, you get a list of who is logged on, and some other stats about their
  156. connection.  If you type in a user's name after you connect to port 79, and
  157. then hit enter, if the username is valid and finger is supported on the host,
  158. you get some more detailed info on them, including a plan and project, if they
  159. created one.  This is fairly self explanatory.  Rumor has it, that as well,
  160. with a finger connection, by confusing the fingerd (daemon) program, it is
  161. also possible to execute commands as root.  I'm only working on some of the
  162. lighter duty aspects of hacking.  Like I said earlier, figure it out.
  163.  
  164.  
  165. Some extra stuff:
  166.  
  167. some of you may wonder why i don't openly publish cookbook hacks for how to
  168. swipe root access out from under the nose of unwary sysadmins.  This is a
  169. simple answer.  if you spend a ton of time figuring it out, you will be more
  170. careful with using it, knowing that if it is abused and the admin knows about
  171. it, it will be fixed.  In order to keep all these hacker wanna-be's out of the
  172. way, i figure I'll just let people know what all's out there, and if they want
  173. to spend time messing with it, they will learn more and be careful.  I've been
  174. on both sides of the security issue, and I love a nice equilibrium between the
  175. two sides.  
  176.